package cn.kone.blog.mapper;

import cn.kone.blog.domain.Article;
import cn.kone.blog.domain.query.ArticleQuery;
import cn.kone.blog.dto.ArticleDTO;

import java.util.List;

public interface ArticleMapper {

    //查询单个
    Article findOne(Long id);

    //查询所有
    List<Article> findAll();

    //新增
    void addArticle(Article article);

    //修改
    void updateArticle(Article article);

    //删除
    void deleteArticle(Long id);

    //高级查询+分页查询
    List<Article> pageQuery(ArticleQuery articleQuery);

    //批量删除用户信息
    void batchDeleteArticle(Long[] ids);

    List<ArticleDTO> articleTimeStatistics();

    List<Article> relateArticle(Article one);

    //文章归档信息
    List<Article> articleGD();
}
